package map.beans;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;


@Entity
@Table(name = "WMS_SERVER")
@NamedQueries({ 
		@NamedQuery(name = "WmsServerBean.findAll", query = "SELECT w FROM WmsServerBean w ORDER BY w.position"),
		@NamedQuery(name = "WmsServerBean.exists",  query = "SELECT COUNT (w) FROM WmsServerBean w WHERE w.name = :name"),
		@NamedQuery(name = "WmsServerBean.getByUsername",  query = "SELECT w FROM WmsServerBean w WHERE w.name = :name")
})
public class WmsServerBean implements Serializable {
	private static final long serialVersionUID = 2335432758996801372L;
	
	@Id
	@GeneratedValue
	private Long urlId;
	private String name;
	private String serverUrl;
	private String type;
	private int position;
	private boolean isActive;

	public WmsServerBean() {
		super();
	}

	public WmsServerBean(Long urlId, String name, String serverUrl, String type, boolean isActive, int position) {
		super();
		this.urlId = urlId;
		this.name = name;
		this.serverUrl = serverUrl;
		this.type = type;
		this.isActive = isActive;
		this.position = position;
	}

	/**
	 * @return the urlId
	 */
	public Long getUrlId() {
		return urlId;
	}

	/**
	 * @param urlId
	 *            the urlId to set
	 */
	public void setUrlId(Long urlId) {
		this.urlId = urlId;
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name
	 *            the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @return the serverUrl
	 */
	public String getServerUrl() {
		return serverUrl;
	}

	/**
	 * @param serverUrl
	 *            the serverUrl to set
	 */
	public void setServerUrl(String serverUrl) {
		this.serverUrl = serverUrl;
	}

	/**
	 * @return the type
	 */
	public String getType() {
		return type;
	}

	/**
	 * @param type
	 *            the type to set
	 */
	public void setType(String type) {
		this.type = type;
	}

	/**
	 * @return the isActive
	 */
	public boolean isActive() {
		return isActive;
	}

	/**
	 * @param isActive
	 *            the isActive to set
	 */
	public void setActive(boolean isActive) {
		this.isActive = isActive;
	}

	/**
	 * @return the position
	 */
	public int getPosition() {
		return position;
	}

	/**
	 * @param position the position to set
	 */
	public void setPosition(int position) {
		this.position = position;
	}		
}